<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<span>娃哈哈</span>

<div id="div">

</div>

<%
//禁用缓存 
response.setHeader("Cache-Control", "no-store");
response.setDateHeader("Expires",0);

// 设置页面自动刷新 
response.setHeader("refresh","1");

//实现网页定时跳转至指定地址(本机或网络域名) 
response.setHeader("refresh", "5;URL=http://www.taobao.com");

//设置缓冲区大小
response.setBufferSize(1000000);

//获取缓冲区实际大小
int size=response.getBufferSize();

//请空缓冲区的内容,同时清除状态码和报头
response.reset();
//判断服务器端是否已经把数据写到客户端
boolean judge=response.isCommitted();

%>
<script type="text/javascript">
var div=document.getElementById("div");
var time=new Date();
div.innerHTML=time.getFullYear()+"年"+time.getMonth()+"月"+time.getDate()+"日"+time.getHours()+"时"+time.getSeconds()+"秒";
</script>

<%="缓冲区的实际大小为:"+size %>
<%="是否将数据全部传输了?"+judge %>

</body>
</html>